﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Game_Fly.Code.AuxiliaryAction
{
    public class ProductionEnemy
    {
        static Random rd = new Random();
        /// <summary>
        /// 生产敌机1
        /// </summary>
        public static void ProductionEnemy1()
        {
            Enemy1 enemy1 = new Enemy1();
            enemy1.X = rd.Next((GameUI.GameForm.ClientSize.Width - GameImage.BJ1.Width) / 2, ((GameUI.GameForm.ClientSize.Width - GameImage.BJ1.Width) / 2) + GameImage.BJ1.Width - GameImage.DiJi1.Width);//随机产生x点
            enemy1.Y = 0;//随机产生y点
            GameUI.ListEnemy1.Add(enemy1);
        }

        /// <summary>
        /// 生产敌机2
        /// </summary>
        public static void ProductionEnemy2()
        {
            Enemy2 enemy2 = new Enemy2();
            enemy2.X = rd.Next((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2, ((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2) + GameImage.BJ2.Width - GameImage.DiJi2.Width);//随机产生x点
            enemy2.Y = -GameImage.DiJi2.Height;//随机产生y点
            GameUI.ListEnemy2.Add(enemy2);
        }

        /// <summary>
        /// 生产敌机Boss
        /// </summary>
        public static void ProductionEnemyBoss()
        {
            EnemyBoss enemyBoss = new EnemyBoss();
            enemyBoss.X = rd.Next((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2, ((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2) + GameImage.BJ2.Width - GameImage.Boss.Width);//随机产生x点
            enemyBoss.Y = -GameImage.Boss.Height;//随机产生y点
            GameUI.ListEnemyBoss.Add(enemyBoss);
        }

        /// <summary>
        /// 生产子弹奖励
        /// </summary>
        public static void ProductionBulletTwoPrize()
        {
            BulletTwoPrize bulletTwoPrize = new BulletTwoPrize();
            bulletTwoPrize.X = rd.Next((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2, ((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2) + GameImage.BJ2.Width - GameImage.ZiDan_Reward.Width);//随机产生x点
            bulletTwoPrize.Y = -GameImage.ZiDan_Reward.Height;//随机产生y点
            GameUI.ListBulletTwoPrize.Add(bulletTwoPrize);
        }

        /// <summary>
        /// 生产生命奖励
        /// </summary>
        public static void ProductionLifePrize()
        {
            LifePrize lifePrize = new LifePrize();
            lifePrize.X = rd.Next((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2, ((GameUI.GameForm.ClientSize.Width - GameImage.BJ2.Width) / 2) + GameImage.BJ2.Width - GameImage.Life.Width);//随机产生x点
            lifePrize.Y = -GameImage.Life.Height;//随机产生y点
            GameUI.ListLifePrize.Add(lifePrize);
        }
    }
}
